
const toggleNavStyle = function(ele) {
    es('.kuai-nav-link').forEach(item => {
        if (item.classList && item.classList.contains('kuai-active')) {
            item.classList.remove('kuai-active')
        }
    })
    ele.classList.add('kuai-active')
}

const handleClickNavBtn = function() {
    e('#id-nav').addEventListener('click', e => {
        let target = e.target
        log(9, target)
        let href = target.getAttribute('href')
        log(10, href)
        // window.open('localhost:5500/' + href)

        // if (target.classList && target.classList.contains('kuai-active')) {
        //     log('have')
        // } else {
        //     toggleNavStyle(target)
        //     // 变更所有的 style
        //     log('null')
        // }
    })
}






const __main = function() {
    handleClickNavBtn()
}

__main()

